-- GENERATED SPELL FOR [Cabal Abjurist] --


function spell0_21660(pUnit, Event) --@Arcane Missiles,n/a--
pUnit:FullCastSpellOnTarget(34447,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21660', 602, 1)
end

function spell1_21660(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_21660', 8318, 1)
end

function Sorts_21660(pUnit, Event)
local choix_sorts_21660 = math.random(0, 1)
if choix_sorts_21660 == 0 then
pUnit:RegisterEvent('spell0_21660', 1, 1)
end
if choix_sorts_21660 == 1 then
pUnit:RegisterEvent('spell1_21660', 1, 1)
end
end

function mob21660_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21660', math.random(1500, 3000), 1)
end

function mob21660_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21660_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21660_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21660, 1, 'mob21660_Action')
RegisterUnitEvent(21660, 2, 'mob21660_Leave')
RegisterUnitEvent(21660, 3, 'mob21660_Kill')
RegisterUnitEvent(21660, 4, 'mob21660_Die')
